package item.lxp.annotation;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import java.lang.annotation.Annotation;

public class TestClass implements ConstraintValidator<TestAnnotation,Object> {


    @Override
    public void initialize(TestAnnotation constraintAnnotation) {
        System.out.print(constraintAnnotation.message());
        System.out.print(constraintAnnotation.groups());
        System.out.print(constraintAnnotation.payload());

    }

    @Override
    public boolean isValid(Object value, ConstraintValidatorContext context) {
        System.out.println(value);
//        context.
        return false;
    }
}
